package com.his.common;

public class StringPolicy {
	private static String charset = "UTF-8";

	public static boolean isOverLength(String str, int limitLength) {
		boolean result = false;
		try {
			if (str.getBytes(charset).length > limitLength)
				result = true;
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return result;
	}

	public static boolean isNull(String str) {
		return (str == null) || ("null".equals(str))
				|| (str.trim().length() <= 0);
	}
}